Skip to content

Fix category arg type in relevant functions in warnings#15830

Open
jonathandung wants to merge 4 commits into
python:mainfrom
jonathandung:patch-3
Open

Fix category arg type in relevant functions in warnings#15830
jonathandung wants to merge 4 commits into
python:mainfrom
jonathandung:patch-3

Conversation

@jonathandung
Copy link
Copy Markdown
Contributor

Closes #15829.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

urllib3 (https://github.com/urllib3/urllib3)
+ test/__init__.py:100: error: Argument 1 to "issubclass" has incompatible type "type[Warning] | tuple[type[Warning], ...]"; expected "type"  [arg-type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warnings.simplefilter and warnings.catch_warnings take tuple[type[Warning], ...] as well as type[Warning] for category parameter

1 participant